package com.sample.oraclejdbc.repository;

import com.sample.oraclejdbc.domain.Country;
import org.springframework.stereotype.Repository;

import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
import java.util.List;

@Repository
public class CountryRepository {

    @PersistenceContext
    private EntityManager em;

    public List<Country> selectList() {
        return em.createQuery("from Country").getResultList();
    }


}
